package com.xihuanjun.sdk.entity;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xihuanjun.sdk.enums.CancelStatusEnmu;
import com.xihuanjun.sdk.enums.DocumentStatusEnum;
import com.xihuanjun.sdk.enums.YNEnum;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * Copyright (C), 2024-08-24
 * FileName: SapOrder
 * Author:   溪浣君
 * Date:     2024-08-24 9:10
 * Description: SAP营销单据基类，包含原生SAP字段，使用时需继承，子类设置自定义字段
 */
@Data
@NoArgsConstructor
@ToString
@JsonAutoDetect(fieldVisibility= JsonAutoDetect.Visibility.ANY,getterVisibility= JsonAutoDetect.Visibility.NONE)
public abstract class SapOrder<T extends SapOrderItem> extends BaseEntity {




    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long DocNum;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private DocumentStatusEnum DocumentStatus;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private CancelStatusEnmu CancelStatus;


    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date DocDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date TaxDate;


    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date DocDueDate;



    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer SalesPersonCode;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String Cancelled;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date DueDate;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer DocumentsOwner;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    List<T> DocumentLines;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    List<T> StockTransferLines;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String FromWarehouse;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String ToWarehouse;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String Comments;


    /**
     * 使用已装运货物科目
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YNEnum UseShpdGoodsAct;
}
